package wsi.input;

import java.util.Collections;
import java.util.LinkedList;
import java.util.List;

public class InputFile {

	private final List<InputFileTuple> inputs = new LinkedList<>();

	public InputFile() {

	}

	public void add(InputFileTuple e) {
		inputs.add(e);
	}

	public void clear() {
		inputs.clear();
	}

	public boolean isEmpty() {
		return inputs.isEmpty();
	}

	public int size() {
		return inputs.size();
	}

	public void sort() {
		Collections.sort(inputs);
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();

		for (InputFileTuple i : inputs) {
			sb.append(i.toJsonString());
			sb.append("\r\n");
		}

		return sb.toString();
	}
}
